Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.253.024 Times

vars::global 0.0.1

  Date Added: June 20, 2010  |  Visits: 1.098

vars::global

Report Broken Link
Printer Friendly Version


Product Homepage
Download (99 downloads)



vars::global is a Perl module that tries to make global variables a little safer. SYNOPSIS # In the place/package where we want to create globals use vars::global create => qw( $foo @bar %baz ); # Add some more global symbols vars::global->create(qw( $hello @world %now )); # Somewhere else, where we need to access those globals use vars::global qw( $foo @bar %baz ); # Dont try to use globals that do not exist use vars::global qw( $Foo ); # typo, croaks use vars::global qw( @inexistent ); # we dont create by default # use create as above # You can also import and create new globals use vars::global qw( $foo %baz ), create => qw( $hey @joe ); # If youre lazy, you can import all the globals defined so far use vars::global :all; This module lets you define global variables and gain a slight advantage over blind use of package variables. The global variables live inside the vars::global package, with the names given by the user. Where the advantage? Its two-fold: there is an import mechanism that lets you access the global variable without the need to fully qualify its name (i.e. using $foo instead of $vars::global::foo); the import mechanism ensures that you can import only the global variables that have been explicitly declared so far, which reduces the possibility of a typo. If you have already "created" the global variable $foo, the import operation is equivalent to do: *{__PACKAGE__ . ::foo} = $vars::global::foo; that is, the package variable in the current package is made an alias for the global variable. The anti-typo check is simply obtained by doing a check before the above import. Typical usage is as follows: creation Early in the module or in the program you create variables prepending the create word, as follows: use vars::global create => qw( $foo @bar %baz ); access In the modules where you need to access a given global variable, you can import them very simply: use vars::global qw( $foo %baz ); # I dont need @bar here ;) The creation step above automatically imports all the new globals into the current package..

Requirements: No special requirements
Platforms: Linux
Keyword: Create Foo Global Global Variable Global Variables Import Libraries Perl Module Programming Qw To Make Tries To Variables Varsglobal
Users rating: 0/10

License: Freeware Size: 7.17 KB
USER REVIEWS
More Reviews or Write Review


VARS::GLOBAL RELATED
Libraries  -  Variable::Strongly::Typed 1.1.0
Variable::Strongly::Typed is a Perl module to let some variables be strongly typed. SYNOPSIS use Variable::Strongly::Typed; my $int :TYPE(int); # must have an int value my $float :TYPE(float); # must have a float value my $string...
10.24 KB  
Libraries  -  Variable::Strongly::Typed::Validators 1.1.0
Variable::Strongly::Typed::Validators is Perl module with built-in type validators. SYNOPSIS This class is utilized by Variable::Strongly::Typed - you dont access this directly. This module defines a %conditions hash contained expressions that...
10.24 KB  
Libraries  -  Java::Import 0.03
Java::Import is Perl module to use Java classes in Perl. SYNOPSIS use Java::Import qw( some.package.SomeClass ); my $instance = new some.package.SomeClass(); $instance->someMethod(); my $ret_val =...
28.67 KB  
Libraries  -  Variable::Strongly::Typed::Scalar 1.1.0
Variable::Strongly::Typed::Scalar is Perl module for strongly typed scalar. SYNOPSIS This class is utilized by Variable::Strongly::Typed - you dont access this directly =head1 DESCRIPTION.
10.24 KB  
Libraries  -  CAD::Drawing 0.26
CAD::Drawing is a Perl module with methods to create, load, and save vector graphics. SYNOPSIS The primary intention of this module is to provide high-level operations for creating, loading, saving and manipulating vector graphics without...
39.94 KB  
Libraries  -  Devel::FindGlobals 0.03
Devel::FindGlobals is a Perl module to find global variables and their size. SYNOPSIS use Devel::FindGlobals; print print_globals_sizes(); This module just runs around and over the symbol table, finds global variables, gets their sizes with...
3.07 KB  
Business  -  TecUtils 0.3.0
tecutils provides various utilities to accelerate development of programs design to use MySQL as a database and substitute the use of global variables.
20.48 KB  
Libraries  -  VCS::PVCS 0.02
VCS::PVCS is a Perl module with global configuration class for for VCS::PVCS::*. SYNOPSIS use VCS::PVCS::Project; # preferred $project = new VCS::PVCS::Project("ProjectName"); The VCS::PVCS class simply parses the PVCS global configuration...
26.62 KB  
Libraries  -  Language::Basic::Variable 1.44
Language::Basic::Variable is a Perl module to handle parsing and implementing BASIC variables. SYNOPSIS See Language::Basic for the overview of how the Language::Basic module works. This pod page is more technical. There are two sorts of...
52.22 KB  
Libraries  -  Variable::Alias 0.01
Variable::Alias is a Perl module created to alias any variable to any other variable. SYNOPSIS use Variable::Alias alias; my $src; my $a; our $b; my @c; our @d; alias $src => $a; alias $a => $b; alias $b => $c[0]; alias @c => @d;...
3.07 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB